<%@ taglib prefix="input" uri="/struts-tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
    #no_scale{margin-left: 2%;}
</style>
<%--<x:parse xml="${param.xmlstr}" var="xmlData" />--%>
<c:set var="nature_value">
    <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />
</c:set>
<input type="hidden" name="zh_parsen/fzr_name" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name"/>" />
<input type="hidden" name="zh_parsen/fzr_mobile" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/>" />
<input type="hidden" name="zh_parsen/fzr_tel" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/>" />
<input type="hidden" name="zh_parsen/fzr_email" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/>" />
<div class="t_bar">
    <%--<span class="color_red">*</span>--%>项目基本情况
</div>
<table class="table01 t_css" width="100%" border="0" cellpadding="0" id="basicInfo_tb" cellspacing="1">
    <col style="width: 20%" />
    <col style="width: 25%" />
    <col style="width: 20%" />
    <col style="width: 20%" />
    <col style="width: 20%" />

    <tr>
        <td align="right"><span class="color_red">*</span>工作站名称：</td>
        <td colspan="4">
            <input type='text' name='proposal/zh_title' id='zh_title' style="width: 76%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/zh_title"/>' label="工作站名称">
        </td>
    </tr>

    <tr>
        <td align="right">申报单位：</td>
        <td colspan="4">
            <span name="organizations/organization/org_name"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name" /></span>
        </td>
    </tr>

   <%-- <tr>
        <td align="right"><span class="color_red">*</span>项目实施地点：</td>
        <td colspan="4">
            <input type='text' name='proposal/project_address' id='project_address' style="width: 76%" class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_address"/>' label="项目实施地点">
        </td>
    </tr>--%>
    <tr>
        <td align="right"><span class="color_red">*</span>归口管理部门：</td>
        <td>
            <c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
            <cpt:tree key="recommended_org" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}" width="75%"  label="归口管理部门"
                      id="recomend_org" onlyChooseLeaf="false"  showPattern="all" shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt" />
            <input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  class="required"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
            <input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
        </td>
        <td align="right" ><span class="color_red">*</span>申报时间：</td>
        <td colspan="2"><c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
            <cpt:date id="apply_date_curr"  name="proposal/submit_date" value="${submit_date}" className="required date" label="申报时间" ></cpt:date>
        </td>
    </tr>
    <%--<tr>
        <td align="right">项目起止时间：</td>
        <td colspan="4"><span name="proposal/start_date" >${param.pro_start_date}</span>~<span name="proposal/end_date" >${param.pro_end_date}</span></td>
        &lt;%&ndash;<td align="right">项目结束时间：</td>
        <td><span name="proposal/end_date" >${param.pro_end_date}</span></td>&ndash;%&gt;
    </tr>--%>
    <%--<tr>
        <td align="right">项目开始时间：</td>
        <td colspan="1"><span name="proposal/start_date" >${param.pro_start_date}</span></td>
        <td align="right">项目结束时间：</td>
        <td colspan="2"><span name="proposal/end_date" >${param.pro_end_date}</span></td>
    </tr>--%>


    <tr>
        <td align="right"><span class="color_red">*</span>基本情况：</td>
        <td colspan="4">
            <textarea name="proposal/summary1" style="width:98%" class="input_textarea required maxlength:500"
                      placeholder="工作站组建备案的必要性和可行性；管理制度等情况；公共服务场地、设备等情况；科技特派员入站工作总体情况等。（500字内）"
                      label="基本情况" rows=5 cols=60><x:out select="$xmlData/data/proposal/summary1"/></textarea>
            <input type="hidden" name="proposal/summary1_hidden" id="proposal/summary1_hidden"
                   value="<x:out select="$xmlData/data/proposal/summary1" />"/>
        </td>
    </tr>

    <tr>
        <td align="right"><span class="color_red">*</span>帮扶及服务机制建立情况：</td>
        <td colspan="4">
            <textarea name="proposal/summary2" style="width:98%" class="input_textarea required maxlength:800"
                      placeholder="与村（含脱贫村）、新型农业经营主体（涉农企业、家庭农场、农民合作社、农业社会组织）和“防止返贫动态监测对象”（脱贫不稳定户、边缘易致贫户、因病因灾等基本生活出现严重困难户）等利益联结机制建立情况（800字内）。"
                      label="帮扶及服务机制建立情况" rows=5 cols=60><x:out select="$xmlData/data/proposal/summary2"/></textarea>
            <input type="hidden" name="proposal/summary2_hidden" id="proposal/summary2_hidden"
                   value="<x:out select="$xmlData/data/proposal/summary2" />"/>
        </td>
    </tr>


    <tr>
        <td align="center"  rowspan="10"><span class="color_red">*</span>2020年以来运行情况（截止2021年6月）</td>
        <td  colspan="3" align="center">相关指标</td>
        <td align="center">数值（各项指标分别注明）</td>
    </tr>

    <tr>

        <td align="left" colspan="3">1.工作站入驻科技特派员数（个），其中外聘科技特派员数（个）</td>
        <td >
            <input type='text' name='proposal/project_shuzhi1'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi1"/>' label="1.工作站入驻科技特派员数（个），其中外聘科技特派员数（个）-->数值">
        </td>

    </tr>


    <tr>

        <td align="left" colspan="3">2.所有外聘科技特派员累计在站工作总天数（天）</td>
        <td >
            <input type='text' name='proposal/project_shuzhi2'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi2"/>' label="2.所有外聘科技特派员累计在站工作总天数（天）-->数值">
        </td>

    </tr>

    <tr>

        <td align="left" colspan="3">3.建立种养殖示范基地，其中，种植（亩）；水产养殖（亩）；出栏猪、牛、羊等（头）；养殖家禽（羽）（分别注明）；拥有生产线（条）、仓储面积（平方米）等</td>
        <td >
            <input type='text' name='proposal/project_shuzhi3'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi3"/>' label="3.建立种养殖示范基地，其中，种植（亩）；水产养殖（亩）；出栏猪、牛、羊等（头）；养殖家禽（羽）（分别注明）；拥有生产线（条）、仓储面积（平方米）等-->数值">
        </td>

    </tr>

    <tr>

        <td align="left" colspan="3">4.引进推广新品种、新技术合计数（个、项）；开发新产品（个）等</td>
        <td >
            <input type='text' name='proposal/project_shuzhi4'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi4"/>' label="4.引进推广新品种、新技术合计数（个、项）；开发新产品（个）等-->数值">
        </td>

    </tr>


    <tr>

        <td align="left" colspan="3">5.服务村数量（个）</td>
        <td >
            <input type='text' name='proposal/project_shuzhi5'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi5"/>' label="5.服务村数量（个）-->数值">
        </td>

    </tr>

    <tr>

        <td align="left" colspan="3">6.服务新型农业经营主体（涉农企业、家庭农场、农民合作社、农业社会组织）数（个）及规模（总产值等，单位万元）等</td>
        <td >
            <input type='text' name='proposal/project_shuzhi6'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi6"/>' label="6.服务新型农业经营主体（涉农企业、家庭农场、农民合作社、农业社会组织）数（个）及规模（总产值等，单位万元）等-->数值">
        </td>

    </tr>

    <tr>

        <td align="left" colspan="3">7.帮扶脱贫户和“防止返贫动态监测对象”（脱贫不稳定户、边缘易致贫户、因病因灾等基本生活出现严重困难户）数（户）</td>
        <td >
            <input type='text' name='proposal/project_shuzhi7'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi7"/>' label="7.帮扶脱贫户和“防止返贫动态监测对象”（脱贫不稳定户、边缘易致贫户、因病因灾等基本生活出现严重困难户）数（户）-->数值">
        </td>

    </tr>

    <tr>

        <td align="left" colspan="3">8.培训和指导农业科技服务人次（人）；直接吸纳就业人数（人）等</td>
        <td >
            <input type='text' name='proposal/project_shuzhi8'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi8"/>' label="8.培训和指导农业科技服务人次（人）；直接吸纳就业人数（人）等-->数值">
        </td>

    </tr>

    <tr>

        <td align="left" colspan="3">9.开展创业辅导活动数（场）及创业辅导人数（人）等</td>
        <td >
            <input type='text' name='proposal/project_shuzhi9'   class="input_css required" maxlength="100" value='<x:out select="$xmlData/data/proposal/project_shuzhi9"/>' label="9.开展创业辅导活动数（场）及创业辅导人数（人）等-->数值">
        </td>

    </tr>

    <tr>
        <td align="right"><span class="color_red">*</span>服务案例：</td>
        <td colspan="4">
            <textarea name="proposal/summary3" style="width:98%" class="input_textarea required maxlength:1000"
                      placeholder="指导和服务村、新型农业经营主体和脱贫户等，促进乡村特色产业发展的模式，需提供2-3个典型案例。（1000字内）"
                      label="服务案例" rows=5 cols=60><x:out select="$xmlData/data/proposal/summary3"/></textarea>
            <input type="hidden" name="proposal/summary3_hidden" id="proposal/summary3_hidden"
                   value="<x:out select="$xmlData/data/proposal/summary3" />"/>
        </td>
    </tr>

    <tr>
        <td align="right" ><span class="color_red">*</span>经费投入：</td>
        <td colspan="4">
            <textarea name="proposal/summary4" style="width:98%" class="input_textarea required maxlength:500"
                      placeholder="2020年-2021年6月工作站经费投入及使用、财务管理制度等情况。（500字内）"
                      label="经费投入" rows=5 cols=60><x:out select="$xmlData/data/proposal/summary4"/></textarea>
            <input type="hidden" name="proposal/summary4_hidden" id="proposal/summary4_hidden"
                   value="<x:out select="$xmlData/data/proposal/summary4" />"/>
        </td>
    </tr>

    <tr>
        <td align="right" ><span class="color_red">*</span>未来两年工作站运营思路和举措：</td>
        <td colspan="4">
            <textarea name="proposal/summary5" style="width:98%" class="input_textarea required maxlength:800"
                      placeholder="（800字内）"
                      label="未来两年工作站运营思路和举措" rows=5 cols=60><x:out select="$xmlData/data/proposal/summary5"/></textarea>
            <input type="hidden" name="proposal/summary5_hidden" id="proposal/summary5_hidden"
                   value="<x:out select="$xmlData/data/proposal/summary5" />"/>
        </td>
    </tr>

</table>

<%--<div class="t_bar">
    合作单位信息（最多只能填写5条）
</div>
<table  id="tblorg_hzs" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
    <thead >
    <tr style="border:1px solid #B7D1E6">
        <th class="TblHead" align="center"  width="5%">选择</th>
        <th class="TblHead" align="center"  width="5%">序号</th>
        <th class="TblHead" align="center"  width="15%">单位名称</th>
        <th class="TblHead" align="center"  width="15%">单位地址</th>
        <th class="TblHead" align="center"  width="10%">合作单位性质</th>
        <th class="TblHead" align="center"  width="10%">合作形式</th>
        <th class="TblHead" align="center"  width="10%">合作经费支出（万元）</th>
        <th class="TblHead" align="center"  width="10%">联系人</th>
        <th class="TblHead" align="center"  width="10%">电话</th>
        <th class="TblHead" align="center"  width="10%">是否长三角区域</th>
    </tr>
    </thead>
    <tbody id="tab">
    <tr style="display:none">
        <td align="center">
            <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_hzs" >
        </td>
        <td align="center">
            <span name="org_hzs|org_hz[0]@seq_no" >[index]</span>
        </td>
        <td align="center">
            <input  onchange="setCooperationUnits()"  id="org_hz_name_[0]" name="org_hzs|org_hz[0]|org_hz_name" label="单位名称" maxlength="100" value="" class=" required input_text" style="width:80%"  />
        </td>
        <td align="center">
            <input  id="org_hz_address_[0]" name="org_hzs|org_hz[0]|org_hz_address" label="单位地址" maxlength="100" value="" class=" required input_text" style="width:80%"  />
        </td>
        <td align="center">
            &lt;%&ndash;<cpt:select id="money_where_[index]" key="money_where" name="money_where" ></cpt:select>
            <input type="hidden" name="org_hzs|org_hz[0]|money_where_value"   value="" class="required input_text" label="经费来源"/>
            <input type="hidden" name="org_hzs|org_hz[0]|money_where_name"  value="" />&ndash;%&gt;
            <input type="text" name="org_hzs|org_hz[0]|cooperation_unit_nature" label="合作单位性质"  maxlength="50"  style="width:80%" class="required" />

        </td>
        <td align="center">
            <input  id="org_hz_xs_[0]" name="org_hzs|org_hz[0]|org_hz_xs" label="合作形式" value="" maxlength="50" class="  required input_text" style="width:80%"  />
        </td>
        <td align="center">
            <input  id="fee_out_[0]" name="org_hzs|org_hz[0]|fee_out" label="合作经费支出" value="" onfocus="InitInput.setNumber(this,9,4,2);" class=" required input_text" style="width:80%;text-align: right;"  />
        </td>
        <td align="center">
            <input  id="lianxi_ps_[0]" name="org_hzs|org_hz[0]|lianxi_ps" label="联系人" value="" maxlength="50" class="  required input_text" style="width:80%"  />
        </td>
        <td align="center">
            <input  onkeyup="this.value=this.value.replace(/\D/g,'')" oninput = "value=value.replace(/[^\d]/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"  id="lianxi_tel_[0]" name="org_hzs|org_hz[0]|lianxi_tel" label="电话" maxlength="11"   value="" class=" required input_text mobile" style="width:80%"  />
        </td>
        <td align="center">
            <cpt:select id="triangle_region[index]" key="no_yes" name="triangle_region" onChange="initControlValue(this.id);" value="" style="width:85%"></cpt:select>
            <input type="hidden" name="org_hzs|org_hz[0]|triangle_region_value" class="required" value=""  label="是否长三角区域" />
            <input type="hidden" name="org_hzs|org_hz[0]|triangle_region_name" value=""/>
        </td>
    </tr>


    <c:set value="0" var="index" scope="page"/>
    <x:forEach select="$xmlData/data/org_hzs/org_hz" var="org_hz">

        <c:choose>
            <c:when test="${index<10}" ><c:set value="0" var="flag" scope="page"/></c:when>
            <c:otherwise><c:set value="" var="flag" scope="page"/></c:otherwise>
        </c:choose>
        <tr >
            <td align="center">
                <input type="radio" style="border: 0px;background-color: white;" class="radiobutton" name="selorg_hzs" >
            </td>
            <td align="center">
                <span   name="org_hzs/org_hz[${flag}${index}]@seq_no" ><x:out select="$org_hz/@seq_no"/></span>
            </td>
            <td align="center">
                <input onchange="setCooperationUnits()"  id="org_hz_name_[${flag}${index}]" name="org_hzs/org_hz[${flag}${index}]/org_hz_name" label="单位名称" maxlength="100" value="<x:out select="$org_hz/org_hz_name"/>" class=" required input_text" style="width:80%"  />
            </td>
            <td align="center">
                <input  id="org_hz_address_[${flag}${index}]" name="org_hzs/org_hz[${flag}${index}]/org_hz_address" label="单位地址" maxlength="100" value="<x:out select="$org_hz/org_hz_address"/>" class=" required input_text" style="width:80%"  />
            </td>
            <td align="center">
                <input id="org_hz_cooperation_[${flag}${index}]" name="org_hzs/org_hz[${flag}${index}]/cooperation_unit_nature" style="width:80%"  type="text"  class="required" value="<x:out select="$org_hz/cooperation_unit_nature"/>" label="合作单位性质" maxlength="50"/>
            </td>
            <td align="center">
                <input  id="org_hz_xs_[${flag}${index}]" name="org_hzs/org_hz[${flag}${index}]/org_hz_xs" label="合作形式" value="<x:out select="$org_hz/org_hz_xs"/>" maxlength="50" class="  required input_text" style="width:80%"  />
            </td>
            <td align="center">
                <input  id="fee_out_[${flag}${index}]" name="org_hzs/org_hz[${flag}${index}]/fee_out" label="合作经费支出" value="<x:out select="$org_hz/fee_out"/>" onfocus="InitInput.setNumber(this,9,4,2);" class=" required input_text" style="width:80%;text-align: right;"  />
            </td>
            <td align="center">
                <input  id="lianxi_ps_[${flag}${index}]" name="org_hzs/org_hz[${flag}${index}]/lianxi_ps" label="联系人" value="<x:out select="$org_hz/lianxi_ps"/>" maxlength="50" class="  required input_text" style="width:80%"  />
            </td>
            <td align="center">
                <input onkeyup="this.value=this.value.replace(/\D/g,'')" oninput = "value=value.replace(/[^\d]/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" id="lianxi_tel_[${flag}${index}]" name="org_hzs/org_hz[${flag}${index}]/lianxi_tel" label="电话"  maxlength="11"   value="<x:out select="$org_hz/lianxi_tel"/>" class=" required input_text mobile" style="width:80%"  />
            </td>
            <td align="center">
                <c:set var="triangle_region"><x:out select="$org_hz/triangle_region_value" /></c:set>
                <cpt:select id="triangle_region${flag}${index}" key="no_yes" name="triangle_region" onChange="initControlValue(this.id);" value="${triangle_region }" style="width:85%"></cpt:select>
                <input type="hidden" name="org_hzs/org_hz[${flag}${index}]/triangle_region_value" class="required" value="<x:out select="$org_hz/triangle_region_value" />"  label="是否长三角区域" />
                <input type="hidden" name="org_hzs/org_hz[${flag}${index}]/triangle_region_name" value="<x:out select="$org_hz/triangle_region_name" />"/>
            </td>
        </tr>
        <c:set value="${index+1}" var="index" scope="page"/>
    </x:forEach>
    </tbody>
</table>

<table id="jbutton" width="98%" align="center" border="0" cellspacing="0" cellpadding="0" style="border:0;">
    <tr ><td>
        <input class="button_02" id="tianjia" name="cmdAddbefore" type=button value="添加" onclick="if(checkTabLimit('tblorg_hzs',5,'合作单位信息最多只能填写5条')){addNewRow('tblorg_hzs');showDateTag('tblorg_hzs');}try{top.resizeFrame();}catch(e){};changeCss('tblorg_hzs');setCooperationUnits()">
        <input class="button_02" name="cmdMovePrev" type=button value="上移" onclick="movePrev('tblorg_hzs','selorg_hzs');changeCss('tblorg_hzs');setCooperationUnits()">
        <input class="button_02" name="cmdMoveNext" type=button value="下移" onclick="moveNext('tblorg_hzs','selorg_hzs');changeCss('tblorg_hzs');setCooperationUnits()">
        <input class="button_02" name="cmddel" type=button  value="删除" onclick="deleteSelectedRow('tblorg_hzs','合作单位信息');changeCss('tblorg_hzs');setCooperationUnits()">
    </td></tr>
</table>--%>
<input type="hidden" name="proposal/cooperation_units" id="cooperation_units" value="<x:out select='$xmlData/data/proposal/cooperation_units'/>"/>
<script type="text/javascript">

    function initTreeValueExt(treeId, treeNode) {
        if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
            scmWarn($("#" + treeId).attr("label") + messageTip.researchAreaInvalidDisciplineCode);
            if (treeNode.level == 0) {
                $("#" + treeId).val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
            }

            return false;
        }


        var str = treeNode.name;
        var obj = treeNode.parentNode;
        while (obj != null) {
            obj = obj.parentNode;
        }

        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);
    }
    function initTreeValueExt2(treeId, treeNode) {

        if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
            scmWarn($("#" + treeId).attr("label") + messageTip.researchAreaInvalidDisciplineCode);
            if (treeNode.level == 0) {
                $("#" + treeId).val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
            }

            return false;
        }


        var str = treeNode.name;
        var obj = treeNode.parentNode;
        while (obj != null) {
            obj = obj.parentNode;
        }

        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);

    }

    function changeCss(id) {
        $("#"+id+">tbody>tr:odd").each(function(){
            $(this).removeClass().addClass("li_1");
        });
        $("#"+id+">tbody>tr:even").each(function(){
            $(this).removeClass().addClass("li_2");
        });
    }
    function setCooperationUnits(){
        var cooperation_units="";
        $("#tblorg_hzs tr:gt(1)").each(function(index){
            var cooperation_unit = $(this).find("td:eq(2) input").val().trim();
            /*var orgName = $("#org_name").val().trim();*/
            var orgName = $('span[name$="organizations/organization/org_name"]').html()
            if(!isBlankOrNull(cooperation_unit) && cooperation_unit!=orgName){
                cooperation_units += cooperation_unit+",";
            }
            /* if(!isBlankOrNull(cooperation_unit)){
                 cooperation_units += cooperation_unit+",";
             }*/
        });
        if(cooperation_units!=""){
            cooperation_units=cooperation_units.substring(0,cooperation_units.length-1);
        }
        $("#cooperation_units").val(cooperation_units);
    }

    function changeNOStatus(value){
        var noObj = $("#private_technology_no");
        if (value == '01'){
            noObj.addClass("required");
            noObj.removeClass("gray");
            noObj.attr("disabled",false);
            noObj.parent().prev().find("span.color_red").text("*");
        }else{
            noObj.removeClass("required");
            noObj.addClass("gray");
            noObj.val('');
            noObj.attr("disabled",true);
            noObj.parent().prev().find("span.color_red").text("");
        }
    }

    /*function setValByRadio(){
        if($('input:radio[name="enterprise_scale"]:checked').val()==0){
            /!*$("#technologyEnterprise").attr("checked","false");*!/
            $("#technologyEnterprise").removeAttr("checked");
        }
        console.log($('input:radio[name="enterprise_scale"]:checked').val());
    }*/

    /***
     * 初始化科技型中小企业选择框是否为可选
     */
    $(document).ready(function(){
        if($('input:checkbox[name="enterprise_scale"]:checked').val()=="中小企业"){
            $("#technologyEnterprise").removeAttr("disabled");
        }else{
            $("#technologyEnterprise").attr("disabled",true);
        }
    });

    /***
     * 勾选中小型企业框时打开科技型中小企业选择
     * 没有勾选时关闭科技型中小企业选择，并清除隐藏域的值
     *
     */
    function removeDisabled(){
        if($('input:checkbox[name="enterprise_scale"]:checked').val()=="中小企业"){
            $("#technologyEnterprise").removeAttr("disabled");
        }else{
            $("#technologyEnterprise").removeAttr("checked");
            $("#technology_enterprise_value").val("");
            $("#technologyEnterprise").attr("disabled",true);
        }
    };



    function initSubjectTreeValueExp(treeId, treeNode) {
        /*if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
            scmWarn($("#" + treeId).attr("label") + "不能选择第一级，请选择它的子级！");
            if (treeNode.level == null) {
                $("#" + treeId).val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
            }
            return false;
        }*/
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(treeNode.name.substring(treeNode.name.indexOf(".") + 1));
        //触发研究方向
        //checkDisCodeExp(treeNode.id,treeId,true); //下拉树
        //checkDisCodeSelect(treeNode.id,treeId,true);
    }
</script>
